package com.wangwen.wechatmp.wxpkg.service.impl;

import com.wangwen.wechatmp.wxpkg.service.WechatService;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.WxMpTemplateMsgService;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class WechatServiceImpl implements WechatService {
    Logger log = LoggerFactory.getLogger("access_info");

    @Autowired(required = false)
    private WxMpService wxService;
    @Override
    public String sendTemplateMsg(WxMpTemplateMessage var1) throws WxErrorException {
        WxMpTemplateMsgService msgService = wxService.getTemplateMsgService();
        return msgService.sendTemplateMsg(var1);
    }


}
